//
//  AboutAppViewController.m
//  HTP
//
//  Created by 陈钱钿 on 15/11/3.
//  Copyright © 2015年 nit. All rights reserved.
//

#import "AboutAppViewController.h"

@interface AboutAppViewController ()

@end

@implementation AboutAppViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    //去掉返回键的字
//    [[UIBarButtonItem appearance] setBackButtonTitlePositionAdjustment:UIOffsetMake(NSIntegerMin, NSIntegerMin) forBarMetrics:UIBarMetricsDefault];
    self.view.backgroundColor = [UIColor colorWithRed:233.0/255 green:233.0/255 blue:233.0/255 alpha:1];
    [self addCustomTitleWithTitle:@"关于青苗"];
    [self addCustomBackWithAction:@selector(doBack) normalImg:[UIImage imageNamed:@"back"] selectImg:[UIImage imageNamed:@"back"] withPadding:5];
    
    [self initUI];
}

- (void)viewWillAppear:(BOOL)animated {
    
}

//绘制UI
- (void)initUI {
    UIImageView *logo = [[UIImageView alloc] initWithFrame:CGRectMake((ScreenWidth-150)/2, ScreenHeihgt/10, 150, 45)];
    logo.image = [UIImage imageNamed:@"logo_set"];
    [self.view addSubview:logo];
    
    UILabel *appName = [[UILabel alloc] initWithFrame:CGRectMake((ScreenWidth-140)/2, CGRectGetMaxY(logo.frame)+ScreenHeihgt/10, 140, 44)];
    appName.text = @"青苗家教  V1.0.0";
    appName.textAlignment = NSTextAlignmentCenter;
    appName.font = [UIFont systemFontOfSize:18.0];
    [self.view addSubview:appName];
    
    UILabel *tip = [[UILabel alloc] initWithFrame:CGRectMake((ScreenWidth-130)/2, CGRectGetMaxY(appName.frame)+10, 130, 40)];
    tip.text = @"当前已经是最新版本";
    tip.textColor = [UIColor grayColor];
    tip.textAlignment = NSTextAlignmentCenter;
    tip.font = [UIFont systemFontOfSize:14.0];
    [self.view addSubview:tip];
    
    UIButton *gradeBtn = [[UIButton alloc] initWithFrame:CGRectMake(0, CGRectGetMaxY(tip.frame)+10, ScreenWidth, 44)];
    [gradeBtn setBackgroundColor:[UIColor whiteColor]];
    [gradeBtn setTitle:@"去评分" forState:UIControlStateNormal];
    [gradeBtn setTitleColor:[UIColor orangeColor] forState:UIControlStateNormal];
    [self.view addSubview:gradeBtn];
}

- (void)doBack {
    [self.navigationController popViewControllerAnimated:YES];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
